package com.yuanfeng.action.admin.type.service;
import com.yuanfeng.action.admin.type.dao.TypeDao;
import com.yuanfeng.pojo.Types;

import java.util.List;

public class TypeServiceImpl implements TypeService{

	/**
	 * 分类的DAO层依赖springIoc注入
	 */
	private TypeDao typeDaoImpl;

	public void setTypeDaoImpl(TypeDao typeDaoImpl) {
		this.typeDaoImpl = typeDaoImpl;
	}

	/**
	 * 查询分类
	 * @return
	 */
	public List<Types> queryTypes(){
		return typeDaoImpl.queryTypes();
	}

	/**
	 * 增加
	 * @param types
	 * @return
	 */
	public Types add(Types types) {
		return typeDaoImpl.add(types);
	}

	/**
	 * 删除
	 * @param types
	 */
	@Override
	public void delete(Types types) {
		typeDaoImpl.delete(types);
	}
}
